FROM ubuntu:latest

# 安装编译工具和依赖库
RUN apt-get update && apt-get install -y \
    build-essential \
    git \
    libgflags-dev \
    libsnappy-dev \
    zlib1g-dev \
    libbz2-dev \
    liblz4-dev \
    libzstd-dev

# 创建目标目录
RUN mkdir -p /rocksdb

# 复制本地 rocksdb 文件夹到容器中
COPY rocksdb /rocksdb

# 进入目录并编译
WORKDIR /rocksdb
RUN make static_lib && make install